package laborhazi;

public class MyThread extends Thread {
	
	private Game game;
	private final int ANIMS = 10;
	MyThread(String s, Game g) {
		super(s);
		game = g;
	}
	public void run() {
		int i;
		while (!game.END) {
			game.view.newRound();
			game.stage.update();
			for (i = 0; i < ANIMS; ++i) {
				game.view.setPhase(i*2);
				game.view.repaint();
				try {
					sleep(90);
				} catch (InterruptedException e) {
					e.printStackTrace();
				}
			}
		}
	}
}
